#pragma once
// MESSAGE Control PACKING

#define MAVLINK_MSG_ID_Control 154

MAVPACKED(
typedef struct __mavlink_control_t {
 uint32_t cogoallocation; /*< [mm] equipment machine aim location.*/
 uint32_t coactuallocation; /*< [mm] equipment machine actual location.*/
 uint32_t cogoalangle; /*< [degree] equipment machine aim angle.*/
 uint32_t coactualangle; /*< [degree] equipment machine actual angle.*/
 uint32_t coX; /*< [mm] equipment machine coordinate x data.*/
 uint32_t coY; /*< [mm] equipment machine coordinate y data.*/
 uint32_t coangle; /*< [mm] equipment machine coordinate angle data.*/
 uint16_t cogoalspeed; /*< [mm/s] equipment machine aim speed data.*/
 uint16_t coactualspeed; /*< [mm/s] equipment machine actual speed data.*/
 uint16_t cogoalaccel; /*< [mm/s^2] equipment machine aim accel data.*/
 uint16_t coactualaccel; /*< [mm/s^2] equipment machine actual accel data.*/
 uint16_t cogoalspinspeed; /*< [degree/s] equipment machine aim spin speed data.*/
 uint16_t coactualspinspeed; /*< [degree/s] equipment machine actual spin speed data.*/
 uint16_t cogoalspinaccel; /*< [degree/s^2] equipment machine aim spin accel data.*/
 uint16_t coactualspinaccel; /*< [degree/s^2] equipment machine actual spin accel data.*/
}) mavlink_control_t;

#define MAVLINK_MSG_ID_Control_LEN 44
#define MAVLINK_MSG_ID_Control_MIN_LEN 44
#define MAVLINK_MSG_ID_154_LEN 44
#define MAVLINK_MSG_ID_154_MIN_LEN 44

#define MAVLINK_MSG_ID_Control_CRC 228
#define MAVLINK_MSG_ID_154_CRC 228



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_Control { \
    154, \
    "Control", \
    15, \
    {  { "cogoallocation", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_control_t, cogoallocation) }, \
         { "coactuallocation", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_control_t, coactuallocation) }, \
         { "cogoalangle", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_control_t, cogoalangle) }, \
         { "coactualangle", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_control_t, coactualangle) }, \
         { "coX", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_control_t, coX) }, \
         { "coY", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_control_t, coY) }, \
         { "coangle", NULL, MAVLINK_TYPE_UINT32_T, 0, 24, offsetof(mavlink_control_t, coangle) }, \
         { "cogoalspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_control_t, cogoalspeed) }, \
         { "coactualspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_control_t, coactualspeed) }, \
         { "cogoalaccel", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_control_t, cogoalaccel) }, \
         { "coactualaccel", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_control_t, coactualaccel) }, \
         { "cogoalspinspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_control_t, cogoalspinspeed) }, \
         { "coactualspinspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_control_t, coactualspinspeed) }, \
         { "cogoalspinaccel", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_control_t, cogoalspinaccel) }, \
         { "coactualspinaccel", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_control_t, coactualspinaccel) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_Control { \
    "Control", \
    15, \
    {  { "cogoallocation", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_control_t, cogoallocation) }, \
         { "coactuallocation", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_control_t, coactuallocation) }, \
         { "cogoalangle", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_control_t, cogoalangle) }, \
         { "coactualangle", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_control_t, coactualangle) }, \
         { "coX", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_control_t, coX) }, \
         { "coY", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_control_t, coY) }, \
         { "coangle", NULL, MAVLINK_TYPE_UINT32_T, 0, 24, offsetof(mavlink_control_t, coangle) }, \
         { "cogoalspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_control_t, cogoalspeed) }, \
         { "coactualspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_control_t, coactualspeed) }, \
         { "cogoalaccel", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_control_t, cogoalaccel) }, \
         { "coactualaccel", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_control_t, coactualaccel) }, \
         { "cogoalspinspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_control_t, cogoalspinspeed) }, \
         { "coactualspinspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_control_t, coactualspinspeed) }, \
         { "cogoalspinaccel", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_control_t, cogoalspinaccel) }, \
         { "coactualspinaccel", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_control_t, coactualspinaccel) }, \
         } \
}
#endif

/**
 * @brief Pack a control message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param cogoallocation [mm] equipment machine aim location.
 * @param coactuallocation [mm] equipment machine actual location.
 * @param cogoalangle [degree] equipment machine aim angle.
 * @param coactualangle [degree] equipment machine actual angle.
 * @param coX [mm] equipment machine coordinate x data.
 * @param coY [mm] equipment machine coordinate y data.
 * @param coangle [mm] equipment machine coordinate angle data.
 * @param cogoalspeed [mm/s] equipment machine aim speed data.
 * @param coactualspeed [mm/s] equipment machine actual speed data.
 * @param cogoalaccel [mm/s^2] equipment machine aim accel data.
 * @param coactualaccel [mm/s^2] equipment machine actual accel data.
 * @param cogoalspinspeed [degree/s] equipment machine aim spin speed data.
 * @param coactualspinspeed [degree/s] equipment machine actual spin speed data.
 * @param cogoalspinaccel [degree/s^2] equipment machine aim spin accel data.
 * @param coactualspinaccel [degree/s^2] equipment machine actual spin accel data.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint32_t cogoallocation, uint32_t coactuallocation, uint32_t cogoalangle, uint32_t coactualangle, uint32_t coX, uint32_t coY, uint32_t coangle, uint16_t cogoalspeed, uint16_t coactualspeed, uint16_t cogoalaccel, uint16_t coactualaccel, uint16_t cogoalspinspeed, uint16_t coactualspinspeed, uint16_t cogoalspinaccel, uint16_t coactualspinaccel)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_Control_LEN];
    _mav_put_uint32_t(buf, 0, cogoallocation);
    _mav_put_uint32_t(buf, 4, coactuallocation);
    _mav_put_uint32_t(buf, 8, cogoalangle);
    _mav_put_uint32_t(buf, 12, coactualangle);
    _mav_put_uint32_t(buf, 16, coX);
    _mav_put_uint32_t(buf, 20, coY);
    _mav_put_uint32_t(buf, 24, coangle);
    _mav_put_uint16_t(buf, 28, cogoalspeed);
    _mav_put_uint16_t(buf, 30, coactualspeed);
    _mav_put_uint16_t(buf, 32, cogoalaccel);
    _mav_put_uint16_t(buf, 34, coactualaccel);
    _mav_put_uint16_t(buf, 36, cogoalspinspeed);
    _mav_put_uint16_t(buf, 38, coactualspinspeed);
    _mav_put_uint16_t(buf, 40, cogoalspinaccel);
    _mav_put_uint16_t(buf, 42, coactualspinaccel);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_Control_LEN);
#else
    mavlink_control_t packet;
    packet.cogoallocation = cogoallocation;
    packet.coactuallocation = coactuallocation;
    packet.cogoalangle = cogoalangle;
    packet.coactualangle = coactualangle;
    packet.coX = coX;
    packet.coY = coY;
    packet.coangle = coangle;
    packet.cogoalspeed = cogoalspeed;
    packet.coactualspeed = coactualspeed;
    packet.cogoalaccel = cogoalaccel;
    packet.coactualaccel = coactualaccel;
    packet.cogoalspinspeed = cogoalspinspeed;
    packet.coactualspinspeed = coactualspinspeed;
    packet.cogoalspinaccel = cogoalspinaccel;
    packet.coactualspinaccel = coactualspinaccel;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_Control_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_Control;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_Control_MIN_LEN, MAVLINK_MSG_ID_Control_LEN, MAVLINK_MSG_ID_Control_CRC);
}

/**
 * @brief Pack a control message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param cogoallocation [mm] equipment machine aim location.
 * @param coactuallocation [mm] equipment machine actual location.
 * @param cogoalangle [degree] equipment machine aim angle.
 * @param coactualangle [degree] equipment machine actual angle.
 * @param coX [mm] equipment machine coordinate x data.
 * @param coY [mm] equipment machine coordinate y data.
 * @param coangle [mm] equipment machine coordinate angle data.
 * @param cogoalspeed [mm/s] equipment machine aim speed data.
 * @param coactualspeed [mm/s] equipment machine actual speed data.
 * @param cogoalaccel [mm/s^2] equipment machine aim accel data.
 * @param coactualaccel [mm/s^2] equipment machine actual accel data.
 * @param cogoalspinspeed [degree/s] equipment machine aim spin speed data.
 * @param coactualspinspeed [degree/s] equipment machine actual spin speed data.
 * @param cogoalspinaccel [degree/s^2] equipment machine aim spin accel data.
 * @param coactualspinaccel [degree/s^2] equipment machine actual spin accel data.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint32_t cogoallocation,uint32_t coactuallocation,uint32_t cogoalangle,uint32_t coactualangle,uint32_t coX,uint32_t coY,uint32_t coangle,uint16_t cogoalspeed,uint16_t coactualspeed,uint16_t cogoalaccel,uint16_t coactualaccel,uint16_t cogoalspinspeed,uint16_t coactualspinspeed,uint16_t cogoalspinaccel,uint16_t coactualspinaccel)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_Control_LEN];
    _mav_put_uint32_t(buf, 0, cogoallocation);
    _mav_put_uint32_t(buf, 4, coactuallocation);
    _mav_put_uint32_t(buf, 8, cogoalangle);
    _mav_put_uint32_t(buf, 12, coactualangle);
    _mav_put_uint32_t(buf, 16, coX);
    _mav_put_uint32_t(buf, 20, coY);
    _mav_put_uint32_t(buf, 24, coangle);
    _mav_put_uint16_t(buf, 28, cogoalspeed);
    _mav_put_uint16_t(buf, 30, coactualspeed);
    _mav_put_uint16_t(buf, 32, cogoalaccel);
    _mav_put_uint16_t(buf, 34, coactualaccel);
    _mav_put_uint16_t(buf, 36, cogoalspinspeed);
    _mav_put_uint16_t(buf, 38, coactualspinspeed);
    _mav_put_uint16_t(buf, 40, cogoalspinaccel);
    _mav_put_uint16_t(buf, 42, coactualspinaccel);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_Control_LEN);
#else
    mavlink_control_t packet;
    packet.cogoallocation = cogoallocation;
    packet.coactuallocation = coactuallocation;
    packet.cogoalangle = cogoalangle;
    packet.coactualangle = coactualangle;
    packet.coX = coX;
    packet.coY = coY;
    packet.coangle = coangle;
    packet.cogoalspeed = cogoalspeed;
    packet.coactualspeed = coactualspeed;
    packet.cogoalaccel = cogoalaccel;
    packet.coactualaccel = coactualaccel;
    packet.cogoalspinspeed = cogoalspinspeed;
    packet.coactualspinspeed = coactualspinspeed;
    packet.cogoalspinaccel = cogoalspinaccel;
    packet.coactualspinaccel = coactualspinaccel;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_Control_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_Control;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_Control_MIN_LEN, MAVLINK_MSG_ID_Control_LEN, MAVLINK_MSG_ID_Control_CRC);
}

/**
 * @brief Encode a control struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param control C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_control_t* control)
{
    return mavlink_msg_control_pack(system_id, component_id, msg, control->cogoallocation, control->coactuallocation, control->cogoalangle, control->coactualangle, control->coX, control->coY, control->coangle, control->cogoalspeed, control->coactualspeed, control->cogoalaccel, control->coactualaccel, control->cogoalspinspeed, control->coactualspinspeed, control->cogoalspinaccel, control->coactualspinaccel);
}

/**
 * @brief Encode a control struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param control C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_control_t* control)
{
    return mavlink_msg_control_pack_chan(system_id, component_id, chan, msg, control->cogoallocation, control->coactuallocation, control->cogoalangle, control->coactualangle, control->coX, control->coY, control->coangle, control->cogoalspeed, control->coactualspeed, control->cogoalaccel, control->coactualaccel, control->cogoalspinspeed, control->coactualspinspeed, control->cogoalspinaccel, control->coactualspinaccel);
}

/**
 * @brief Send a control message
 * @param chan MAVLink channel to send the message
 *
 * @param cogoallocation [mm] equipment machine aim location.
 * @param coactuallocation [mm] equipment machine actual location.
 * @param cogoalangle [degree] equipment machine aim angle.
 * @param coactualangle [degree] equipment machine actual angle.
 * @param coX [mm] equipment machine coordinate x data.
 * @param coY [mm] equipment machine coordinate y data.
 * @param coangle [mm] equipment machine coordinate angle data.
 * @param cogoalspeed [mm/s] equipment machine aim speed data.
 * @param coactualspeed [mm/s] equipment machine actual speed data.
 * @param cogoalaccel [mm/s^2] equipment machine aim accel data.
 * @param coactualaccel [mm/s^2] equipment machine actual accel data.
 * @param cogoalspinspeed [degree/s] equipment machine aim spin speed data.
 * @param coactualspinspeed [degree/s] equipment machine actual spin speed data.
 * @param cogoalspinaccel [degree/s^2] equipment machine aim spin accel data.
 * @param coactualspinaccel [degree/s^2] equipment machine actual spin accel data.
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_control_send(mavlink_channel_t chan, uint32_t cogoallocation, uint32_t coactuallocation, uint32_t cogoalangle, uint32_t coactualangle, uint32_t coX, uint32_t coY, uint32_t coangle, uint16_t cogoalspeed, uint16_t coactualspeed, uint16_t cogoalaccel, uint16_t coactualaccel, uint16_t cogoalspinspeed, uint16_t coactualspinspeed, uint16_t cogoalspinaccel, uint16_t coactualspinaccel)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_Control_LEN];
    _mav_put_uint32_t(buf, 0, cogoallocation);
    _mav_put_uint32_t(buf, 4, coactuallocation);
    _mav_put_uint32_t(buf, 8, cogoalangle);
    _mav_put_uint32_t(buf, 12, coactualangle);
    _mav_put_uint32_t(buf, 16, coX);
    _mav_put_uint32_t(buf, 20, coY);
    _mav_put_uint32_t(buf, 24, coangle);
    _mav_put_uint16_t(buf, 28, cogoalspeed);
    _mav_put_uint16_t(buf, 30, coactualspeed);
    _mav_put_uint16_t(buf, 32, cogoalaccel);
    _mav_put_uint16_t(buf, 34, coactualaccel);
    _mav_put_uint16_t(buf, 36, cogoalspinspeed);
    _mav_put_uint16_t(buf, 38, coactualspinspeed);
    _mav_put_uint16_t(buf, 40, cogoalspinaccel);
    _mav_put_uint16_t(buf, 42, coactualspinaccel);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_Control, buf, MAVLINK_MSG_ID_Control_MIN_LEN, MAVLINK_MSG_ID_Control_LEN, MAVLINK_MSG_ID_Control_CRC);
#else
    mavlink_control_t packet;
    packet.cogoallocation = cogoallocation;
    packet.coactuallocation = coactuallocation;
    packet.cogoalangle = cogoalangle;
    packet.coactualangle = coactualangle;
    packet.coX = coX;
    packet.coY = coY;
    packet.coangle = coangle;
    packet.cogoalspeed = cogoalspeed;
    packet.coactualspeed = coactualspeed;
    packet.cogoalaccel = cogoalaccel;
    packet.coactualaccel = coactualaccel;
    packet.cogoalspinspeed = cogoalspinspeed;
    packet.coactualspinspeed = coactualspinspeed;
    packet.cogoalspinaccel = cogoalspinaccel;
    packet.coactualspinaccel = coactualspinaccel;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_Control, (const char *)&packet, MAVLINK_MSG_ID_Control_MIN_LEN, MAVLINK_MSG_ID_Control_LEN, MAVLINK_MSG_ID_Control_CRC);
#endif
}

/**
 * @brief Send a control message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_control_send_struct(mavlink_channel_t chan, const mavlink_control_t* control)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_control_send(chan, control->cogoallocation, control->coactuallocation, control->cogoalangle, control->coactualangle, control->coX, control->coY, control->coangle, control->cogoalspeed, control->coactualspeed, control->cogoalaccel, control->coactualaccel, control->cogoalspinspeed, control->coactualspinspeed, control->cogoalspinaccel, control->coactualspinaccel);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_Control, (const char *)control, MAVLINK_MSG_ID_Control_MIN_LEN, MAVLINK_MSG_ID_Control_LEN, MAVLINK_MSG_ID_Control_CRC);
#endif
}

#if MAVLINK_MSG_ID_Control_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This varient of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_control_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint32_t cogoallocation, uint32_t coactuallocation, uint32_t cogoalangle, uint32_t coactualangle, uint32_t coX, uint32_t coY, uint32_t coangle, uint16_t cogoalspeed, uint16_t coactualspeed, uint16_t cogoalaccel, uint16_t coactualaccel, uint16_t cogoalspinspeed, uint16_t coactualspinspeed, uint16_t cogoalspinaccel, uint16_t coactualspinaccel)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint32_t(buf, 0, cogoallocation);
    _mav_put_uint32_t(buf, 4, coactuallocation);
    _mav_put_uint32_t(buf, 8, cogoalangle);
    _mav_put_uint32_t(buf, 12, coactualangle);
    _mav_put_uint32_t(buf, 16, coX);
    _mav_put_uint32_t(buf, 20, coY);
    _mav_put_uint32_t(buf, 24, coangle);
    _mav_put_uint16_t(buf, 28, cogoalspeed);
    _mav_put_uint16_t(buf, 30, coactualspeed);
    _mav_put_uint16_t(buf, 32, cogoalaccel);
    _mav_put_uint16_t(buf, 34, coactualaccel);
    _mav_put_uint16_t(buf, 36, cogoalspinspeed);
    _mav_put_uint16_t(buf, 38, coactualspinspeed);
    _mav_put_uint16_t(buf, 40, cogoalspinaccel);
    _mav_put_uint16_t(buf, 42, coactualspinaccel);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_Control, buf, MAVLINK_MSG_ID_Control_MIN_LEN, MAVLINK_MSG_ID_Control_LEN, MAVLINK_MSG_ID_Control_CRC);
#else
    mavlink_control_t *packet = (mavlink_control_t *)msgbuf;
    packet->cogoallocation = cogoallocation;
    packet->coactuallocation = coactuallocation;
    packet->cogoalangle = cogoalangle;
    packet->coactualangle = coactualangle;
    packet->coX = coX;
    packet->coY = coY;
    packet->coangle = coangle;
    packet->cogoalspeed = cogoalspeed;
    packet->coactualspeed = coactualspeed;
    packet->cogoalaccel = cogoalaccel;
    packet->coactualaccel = coactualaccel;
    packet->cogoalspinspeed = cogoalspinspeed;
    packet->coactualspinspeed = coactualspinspeed;
    packet->cogoalspinaccel = cogoalspinaccel;
    packet->coactualspinaccel = coactualspinaccel;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_Control, (const char *)packet, MAVLINK_MSG_ID_Control_MIN_LEN, MAVLINK_MSG_ID_Control_LEN, MAVLINK_MSG_ID_Control_CRC);
#endif
}
#endif

#endif

// MESSAGE Control UNPACKING


/**
 * @brief Get field cogoallocation from control message
 *
 * @return [mm] equipment machine aim location.
 */
static inline uint32_t mavlink_msg_control_get_cogoallocation(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  0);
}

/**
 * @brief Get field coactuallocation from control message
 *
 * @return [mm] equipment machine actual location.
 */
static inline uint32_t mavlink_msg_control_get_coactuallocation(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  4);
}

/**
 * @brief Get field cogoalangle from control message
 *
 * @return [degree] equipment machine aim angle.
 */
static inline uint32_t mavlink_msg_control_get_cogoalangle(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  8);
}

/**
 * @brief Get field coactualangle from control message
 *
 * @return [degree] equipment machine actual angle.
 */
static inline uint32_t mavlink_msg_control_get_coactualangle(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  12);
}

/**
 * @brief Get field coX from control message
 *
 * @return [mm] equipment machine coordinate x data.
 */
static inline uint32_t mavlink_msg_control_get_coX(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  16);
}

/**
 * @brief Get field coY from control message
 *
 * @return [mm] equipment machine coordinate y data.
 */
static inline uint32_t mavlink_msg_control_get_coY(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  20);
}

/**
 * @brief Get field coangle from control message
 *
 * @return [mm] equipment machine coordinate angle data.
 */
static inline uint32_t mavlink_msg_control_get_coangle(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  24);
}

/**
 * @brief Get field cogoalspeed from control message
 *
 * @return [mm/s] equipment machine aim speed data.
 */
static inline uint16_t mavlink_msg_control_get_cogoalspeed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  28);
}

/**
 * @brief Get field coactualspeed from control message
 *
 * @return [mm/s] equipment machine actual speed data.
 */
static inline uint16_t mavlink_msg_control_get_coactualspeed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  30);
}

/**
 * @brief Get field cogoalaccel from control message
 *
 * @return [mm/s^2] equipment machine aim accel data.
 */
static inline uint16_t mavlink_msg_control_get_cogoalaccel(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  32);
}

/**
 * @brief Get field coactualaccel from control message
 *
 * @return [mm/s^2] equipment machine actual accel data.
 */
static inline uint16_t mavlink_msg_control_get_coactualaccel(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  34);
}

/**
 * @brief Get field cogoalspinspeed from control message
 *
 * @return [degree/s] equipment machine aim spin speed data.
 */
static inline uint16_t mavlink_msg_control_get_cogoalspinspeed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  36);
}

/**
 * @brief Get field coactualspinspeed from control message
 *
 * @return [degree/s] equipment machine actual spin speed data.
 */
static inline uint16_t mavlink_msg_control_get_coactualspinspeed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  38);
}

/**
 * @brief Get field cogoalspinaccel from control message
 *
 * @return [degree/s^2] equipment machine aim spin accel data.
 */
static inline uint16_t mavlink_msg_control_get_cogoalspinaccel(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  40);
}

/**
 * @brief Get field coactualspinaccel from control message
 *
 * @return [degree/s^2] equipment machine actual spin accel data.
 */
static inline uint16_t mavlink_msg_control_get_coactualspinaccel(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  42);
}

/**
 * @brief Decode a control message into a struct
 *
 * @param msg The message to decode
 * @param control C-struct to decode the message contents into
 */
static inline void mavlink_msg_control_decode(const mavlink_message_t* msg, mavlink_control_t* control)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    control->cogoallocation = mavlink_msg_control_get_cogoallocation(msg);
    control->coactuallocation = mavlink_msg_control_get_coactuallocation(msg);
    control->cogoalangle = mavlink_msg_control_get_cogoalangle(msg);
    control->coactualangle = mavlink_msg_control_get_coactualangle(msg);
    control->coX = mavlink_msg_control_get_coX(msg);
    control->coY = mavlink_msg_control_get_coY(msg);
    control->coangle = mavlink_msg_control_get_coangle(msg);
    control->cogoalspeed = mavlink_msg_control_get_cogoalspeed(msg);
    control->coactualspeed = mavlink_msg_control_get_coactualspeed(msg);
    control->cogoalaccel = mavlink_msg_control_get_cogoalaccel(msg);
    control->coactualaccel = mavlink_msg_control_get_coactualaccel(msg);
    control->cogoalspinspeed = mavlink_msg_control_get_cogoalspinspeed(msg);
    control->coactualspinspeed = mavlink_msg_control_get_coactualspinspeed(msg);
    control->cogoalspinaccel = mavlink_msg_control_get_cogoalspinaccel(msg);
    control->coactualspinaccel = mavlink_msg_control_get_coactualspinaccel(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_Control_LEN? msg->len : MAVLINK_MSG_ID_Control_LEN;
        memset(control, 0, MAVLINK_MSG_ID_Control_LEN);
    memcpy(control, _MAV_PAYLOAD(msg), len);
#endif
}
